<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/9
 * Time: 10:06
 */
namespace app\admin\common\controller;

use think\Controller;
use think\facade\Session;

class Base extends Controller
{
    public function initialize()
    {

    }

    /**
     * 检测用户是否登陆
     * 1.调用位置：后台入口：admin.php/index/index
     */
    protected function isLogin(){
        if (!Session::has('admin_id')){
            $this->error('请先登录', 'admin/user/login');
        }
    }
}